#include <rtthread.h>
#include <board.h>
#include <rtdevice.h>


struct rt_device_pwm *pwm_dev;
int pulse = 0;

void pwm_init(void)
{
	pwm_dev = (struct rt_device_pwm*) rt_device_find("pwm3");
	if(pwm_dev ==RT_NULL)
	{
		rt_kprintf("find pwm3 error\n");
	}
	else{
		    
		    rt_kprintf("find pwm3 success\n");
        rt_pwm_set(pwm_dev, 0, 200000, 100000);
        rt_pwm_enable(pwm_dev, 0); 
	}
}

MSH_CMD_EXPORT(pwm_init, timer3 init);